package cn.lunkr.sdkdemo;

import android.app.Application;
import android.os.Handler;

import cn.lunkr.base.CApp;
import cn.lunkr.base.util.LogUtil;

public class DemoApp extends Application {

    private static final String TAG = "CApp";
    private static DemoApp sInstance = null;


    public static Handler CALLBACK = new Handler();

    public DemoApp() {
        sInstance = this;
        CApp.getInstance().setmContext(this);
    }

    public synchronized static DemoApp get() {
        if (sInstance == null) {
            throw new RuntimeException("CApp is null or dead.");
        }
        return sInstance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        LogUtil.d(TAG, "CApp Application onCreate");
    }
}
